package com.bjsxt.controller.erp;

import com.bjsxt.controller.BaseController;
import com.bjsxt.dto.InventoryLogDto;
import com.bjsxt.service.InventoryLogService;
import com.bjsxt.vo.AjaxResult;
import com.bjsxt.vo.DataGridView;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:liao
 * @Description:TODO
 * @date:2021/1/10
 */
@RestController
@RequestMapping("/erp/inventoryLog")
public class InventoryController extends BaseController {

    @Reference
    private InventoryLogService inventoryLogService;

    @GetMapping("listInventoryLogForPage")
    @HystrixCommand
    public AjaxResult listInventoryLogForPage(InventoryLogDto inventoryLogDto){
        DataGridView dataGridView = inventoryLogService.listInventoryPage(inventoryLogDto);
        return AjaxResult.success("查询成功",dataGridView.getData(),dataGridView.getTotal());
    }
}
